<%
	[res].user = getRes(getUser!);
	[res].res=getRes(getp('resource'));
	.ok=checkAction{{:'action'=>'remove','resource'=>res.id},user};
%>
<%=pageHead%> 
<link href="genlayout.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="script.js"></script>
<title>Remove resource</title>
</head>
<body>
<%=blockHead%>
Remove
<%=blockEnd%>
<div class="resource"><div class="border"><div class="resourceBox"><div style="height:260px;"><%
ok ?
(
	[res=>].a=getAggregation(res);
	@a>1 ?
	(%>
Are you sure you want to remove the following set of resources:<br><%=''+(a:!{,"'",$->getTitle(),"', "})>>2%> ? <%
	)
	:
	(%>
Are you sure you want to remove resource '<%=res->getTitle()%>' ?<%
	);
	%>
<br><br><a href="action.tsp?action=remove&resource=<%=tyleToUrl(res.id)%>" onclick="return returnToParent(this);" class="action">Ok</a>&nbsp;&nbsp;
<a href="resourcerer.tsp?resource=<%=tyleToUrl(res.id)%>" onclick="return returnToParent(this);" class="action">Cancel</a><%
) : (%>
You cannot remove this resource because you are do not have control-level access or this resource aggregates too many other resources.<br><br><%
	.url=actUrl{'addmetastat',user,{:'resource'=>c.id,'p'=>SubclassResource.id,'o'=>DeletionCandidateResource.id},'request a deletion',(),'return returnToParent(this);'};
	url!=()?(%>
You can <%=url%>.<br><br><%
	);%>
<a href="resourcerer.tsp?resource=<%=tyleToUrl(res.id)%>" onclick="return returnToParent(this);" class="action">Back</a><%
); %>
</div><%=blockEnd%>
</body>
</html>